{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=104
  Verdict: Accepted
}
var c:char;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
read(c);
if c in ['a'..'z'] then write(chr(ord(C)-(ord('a')-ord('A')))) else
if c in ['A'..'Z'] then write(chr(ord(C)+(ord('a')-ord('A'))))  else write(c);
end.